<?php
defined('IN_DESTOON') or exit('Access Denied');
include tpl('header');
show_menu($menus);
?>
<div class="tt">规格管理</div>
<form method="post">
<table cellpadding="2" cellspacing="1" class="tb">
<tr>
<th width="25"><input type="checkbox" onclick="checkall(this.form);"/></th>
<th>ID</th>
<th>商品名称</th>
<th width="51">属性数</th>
<th width="34">状态</th>
<th width="80">操作</th>
</tr>
<?php foreach($DTCAT as $k=>$v) {?>
<tr onmouseover="this.className='on';" onmouseout="this.className='';" align="center">
<td><input type="checkbox" name="catids[]" value="<?php echo $v['cat_id'];?>"/></td>
<td>&nbsp;<?php echo $v['cat_id'];?>&nbsp;</td>
<td><?php echo $v['cat_name'];?></td>
<td>
	<?php
		$count = $db->get_one("select count(*) as count from {$_goods->attribute} where cat_id=".$v['cat_id']);
		echo $count['count'];
	?>
</td>
<td><?php if($v['enabled']){?>是<?php }else{?>否<?php }?></td>
<td>
<a href="?file=attribute&moduleid=<?php echo $moduleid;?>&cat_id=<?php echo $v['cat_id'];?>"><img src="admin/image/add.png" width="16" height="16" title="属性列表" alt=""/></a>&nbsp;
<a href="?file=<?php echo $file;?>&action=edit&moduleid=<?php echo $moduleid;?>&cat_id=<?php echo $v['cat_id'];?>"><img src="admin/image/edit.png" width="16" height="16" title="修改" alt=""/></a></td>
</tr>
<?php }?>
</table>

</form>
<br/>
<script type="text/javascript">
function Prop(t, n) {
	mkDialog('', '<iframe src="?file=property&catid='+n+'" width="700" height=300" border="0" vspace="0" hspace="0" marginwidth="0" marginheight="0" framespacing="0" frameborder="0" scrolling="yes"></iframe>', '['+t+']扩展属性', 720, 0, 0);
}
</script>
<?php include tpl('footer');?>